3.224 \(\int \frac{(h+i x)^2 (a+b \log (c (d+e x)^n))^2}{f+g x} \, dx\)

Optimal. Leaf size=469 \[ \frac{2 b n (g h-f i)^2 \text{PolyLog}\left (2,-\frac{g (d+e x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^3}-\frac{2 b^2 n^2 (g h-f i)^2 \text{PolyLog}\left (3,-\frac{g (d+e x)}{e f-d g}\right )}{g^3}+\frac{i (d+e x) (e h-d i) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e^2 g}-\frac{b i^2 n (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{2 e^2 g}+\frac{i^2 (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 e^2 g}+\frac{i (d+e x) (g h-f i) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}+\frac{(g h-f i)^2 \log \left (\frac{e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{g^3}-\frac{2 a b i n x (e h-d i)}{e g}-\frac{2 a b i n x (g h-f i)}{g^2}-\frac{2 b^2 i n (d+e x) (e h-d i) \log \left (c (d+e x)^n\right )}{e^2 g}-\frac{2 b^2 i n (d+e x) (g h-f i) \log \left (c (d+e x)^n\right )}{e g^2}+\frac{b^2 i^2 n^2 (d+e x)^2}{4 e^2 g}+\frac{2 b^2 i n^2 x (e h-d i)}{e g}+\frac{2 b^2 i n^2 x (g h-f i)}{g^2} \]

[Out]

(-2*a*b*i*(e*h - d*i)*n*x)/(e*g) - (2*a*b*i*(g*h - f*i)*n*x)/g^2 + (2*b^2*i*(e*h - d*i)*n^2*x)/(e*g) + (2*b^2*
i*(g*h - f*i)*n^2*x)/g^2 + (b^2*i^2*n^2*(d + e*x)^2)/(4*e^2*g) - (2*b^2*i*(e*h - d*i)*n*(d + e*x)*Log[c*(d + e
*x)^n])/(e^2*g) - (2*b^2*i*(g*h - f*i)*n*(d + e*x)*Log[c*(d + e*x)^n])/(e*g^2) - (b*i^2*n*(d + e*x)^2*(a + b*L
og[c*(d + e*x)^n]))/(2*e^2*g) + (i*(e*h - d*i)*(d + e*x)*(a + b*Log[c*(d + e*x)^n])^2)/(e^2*g) + (i*(g*h - f*i
)*(d + e*x)*(a + b*Log[c*(d + e*x)^n])^2)/(e*g^2) + (i^2*(d + e*x)^2*(a + b*Log[c*(d + e*x)^n])^2)/(2*e^2*g) +
 ((g*h - f*i)^2*(a + b*Log[c*(d + e*x)^n])^2*Log[(e*(f + g*x))/(e*f - d*g)])/g^3 + (2*b*(g*h - f*i)^2*n*(a + b
*Log[c*(d + e*x)^n])*PolyLog[2, -((g*(d + e*x))/(e*f - d*g))])/g^3 - (2*b^2*(g*h - f*i)^2*n^2*PolyLog[3, -((g*
(d + e*x))/(e*f - d*g))])/g^3

________________________________________________________________________________________

Rubi [A]  time = 0.554793, antiderivative size = 469, normalized size of antiderivative = 1., number of steps used = 19, number of rules used = 12, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.387, Rules used = {2418, 2389, 2296, 2295, 2396, 2433, 2374, 6589, 2401, 2390, 2305, 2304} \[ \frac{2 b n (g h-f i)^2 \text{PolyLog}\left (2,-\frac{g (d+e x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^3}-\frac{2 b^2 n^2 (g h-f i)^2 \text{PolyLog}\left (3,-\frac{g (d+e x)}{e f-d g}\right )}{g^3}+\frac{i (d+e x) (e h-d i) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e^2 g}-\frac{b i^2 n (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{2 e^2 g}+\frac{i^2 (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 e^2 g}+\frac{i (d+e x) (g h-f i) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}+\frac{(g h-f i)^2 \log \left (\frac{e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{g^3}-\frac{2 a b i n x (e h-d i)}{e g}-\frac{2 a b i n x (g h-f i)}{g^2}-\frac{2 b^2 i n (d+e x) (e h-d i) \log \left (c (d+e x)^n\right )}{e^2 g}-\frac{2 b^2 i n (d+e x) (g h-f i) \log \left (c (d+e x)^n\right )}{e g^2}+\frac{b^2 i^2 n^2 (d+e x)^2}{4 e^2 g}+\frac{2 b^2 i n^2 x (e h-d i)}{e g}+\frac{2 b^2 i n^2 x (g h-f i)}{g^2} \]

Antiderivative was successfully verified.

[In]

Int[((h + i*x)^2*(a + b*Log[c*(d + e*x)^n])^2)/(f + g*x),x]

[Out]

(-2*a*b*i*(e*h - d*i)*n*x)/(e*g) - (2*a*b*i*(g*h - f*i)*n*x)/g^2 + (2*b^2*i*(e*h - d*i)*n^2*x)/(e*g) + (2*b^2*
i*(g*h - f*i)*n^2*x)/g^2 + (b^2*i^2*n^2*(d + e*x)^2)/(4*e^2*g) - (2*b^2*i*(e*h - d*i)*n*(d + e*x)*Log[c*(d + e
*x)^n])/(e^2*g) - (2*b^2*i*(g*h - f*i)*n*(d + e*x)*Log[c*(d + e*x)^n])/(e*g^2) - (b*i^2*n*(d + e*x)^2*(a + b*L
og[c*(d + e*x)^n]))/(2*e^2*g) + (i*(e*h - d*i)*(d + e*x)*(a + b*Log[c*(d + e*x)^n])^2)/(e^2*g) + (i*(g*h - f*i
)*(d + e*x)*(a + b*Log[c*(d + e*x)^n])^2)/(e*g^2) + (i^2*(d + e*x)^2*(a + b*Log[c*(d + e*x)^n])^2)/(2*e^2*g) +
 ((g*h - f*i)^2*(a + b*Log[c*(d + e*x)^n])^2*Log[(e*(f + g*x))/(e*f - d*g)])/g^3 + (2*b*(g*h - f*i)^2*n*(a + b
*Log[c*(d + e*x)^n])*PolyLog[2, -((g*(d + e*x))/(e*f - d*g))])/g^3 - (2*b^2*(g*h - f*i)^2*n^2*PolyLog[3, -((g*
(d + e*x))/(e*f - d*g))])/g^3

Rule 2418

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[
(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunct
ionQ[RFx, x] && IntegerQ[p]

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2396

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*
(f + g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n])^p)/g, x] - Dist[(b*e*n*p)/g, Int[(Log[(e*(f + g*x))/(e*f -
d*g)]*(a + b*Log[c*(d + e*x)^n])^(p - 1))/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[e*
f - d*g, 0] && IGtQ[p, 1]

Rule 2433

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + Log[(h_.)*((i_.) + (j_.)*(x_))^(m_.)]*
(g_.))*((k_.) + (l_.)*(x_))^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((k*x)/d)^r*(a + b*Log[c*x^n])^p*(f + g*Lo
g[h*((e*i - d*j)/e + (j*x)/e)^m]), x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, j, k, l, n, p, r},
 x] && EqQ[e*k - d*l, 0]

Rule 2374

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> -Sim
p[(PolyLog[2, -(d*f*x^m)]*(a + b*Log[c*x^n])^p)/m, x] + Dist[(b*n*p)/m, Int[(PolyLog[2, -(d*f*x^m)]*(a + b*Log
[c*x^n])^(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rule 2401

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Int[Exp
andIntegrand[(f + g*x)^q*(a + b*Log[c*(d + e*x)^n])^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[
e*f - d*g, 0] && IGtQ[q, 0]

Rule 2390

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(q_.), x_Symbol] :> Dist[1/
e, Subst[Int[((f*x)/d)^q*(a + b*Log[c*x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, q}, x]
 && EqQ[e*f - d*g, 0]

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rubi steps

\begin{align*} \int \frac{(h+224 x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x} \, dx &=\int \left (\frac{224 (-224 f+g h) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{g^2}+\frac{224 (h+224 x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{g}+\frac{(-224 f+g h)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{g^2 (f+g x)}\right ) \, dx\\ &=\frac{224 \int (h+224 x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \, dx}{g}-\frac{(224 (224 f-g h)) \int \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \, dx}{g^2}+\frac{(224 f-g h)^2 \int \frac{\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x} \, dx}{g^2}\\ &=\frac{(224 f-g h)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac{e (f+g x)}{e f-d g}\right )}{g^3}+\frac{224 \int \left (\frac{(-224 d+e h) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e}+\frac{224 (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e}\right ) \, dx}{g}-\frac{(224 (224 f-g h)) \operatorname{Subst}\left (\int \left (a+b \log \left (c x^n\right )\right )^2 \, dx,x,d+e x\right )}{e g^2}-\frac{\left (2 b e (224 f-g h)^2 n\right ) \int \frac{\left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac{e (f+g x)}{e f-d g}\right )}{d+e x} \, dx}{g^3}\\ &=-\frac{224 (224 f-g h) (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}+\frac{(224 f-g h)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac{e (f+g x)}{e f-d g}\right )}{g^3}+\frac{50176 \int (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \, dx}{e g}-\frac{(224 (224 d-e h)) \int \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \, dx}{e g}+\frac{(448 b (224 f-g h) n) \operatorname{Subst}\left (\int \left (a+b \log \left (c x^n\right )\right ) \, dx,x,d+e x\right )}{e g^2}-\frac{\left (2 b (224 f-g h)^2 n\right ) \operatorname{Subst}\left (\int \frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (\frac{e \left (\frac{e f-d g}{e}+\frac{g x}{e}\right )}{e f-d g}\right )}{x} \, dx,x,d+e x\right )}{g^3}\\ &=\frac{448 a b (224 f-g h) n x}{g^2}-\frac{224 (224 f-g h) (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}+\frac{(224 f-g h)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac{e (f+g x)}{e f-d g}\right )}{g^3}+\frac{2 b (224 f-g h)^2 n \left (a+b \log \left (c (d+e x)^n\right )\right ) \text{Li}_2\left (-\frac{g (d+e x)}{e f-d g}\right )}{g^3}+\frac{50176 \operatorname{Subst}\left (\int x \left (a+b \log \left (c x^n\right )\right )^2 \, dx,x,d+e x\right )}{e^2 g}-\frac{(224 (224 d-e h)) \operatorname{Subst}\left (\int \left (a+b \log \left (c x^n\right )\right )^2 \, dx,x,d+e x\right )}{e^2 g}+\frac{\left (448 b^2 (224 f-g h) n\right ) \operatorname{Subst}\left (\int \log \left (c x^n\right ) \, dx,x,d+e x\right )}{e g^2}-\frac{\left (2 b^2 (224 f-g h)^2 n^2\right ) \operatorname{Subst}\left (\int \frac{\text{Li}_2\left (-\frac{g x}{e f-d g}\right )}{x} \, dx,x,d+e x\right )}{g^3}\\ &=\frac{448 a b (224 f-g h) n x}{g^2}-\frac{448 b^2 (224 f-g h) n^2 x}{g^2}+\frac{448 b^2 (224 f-g h) n (d+e x) \log \left (c (d+e x)^n\right )}{e g^2}-\frac{224 (224 d-e h) (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e^2 g}-\frac{224 (224 f-g h) (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}+\frac{25088 (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e^2 g}+\frac{(224 f-g h)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac{e (f+g x)}{e f-d g}\right )}{g^3}+\frac{2 b (224 f-g h)^2 n \left (a+b \log \left (c (d+e x)^n\right )\right ) \text{Li}_2\left (-\frac{g (d+e x)}{e f-d g}\right )}{g^3}-\frac{2 b^2 (224 f-g h)^2 n^2 \text{Li}_3\left (-\frac{g (d+e x)}{e f-d g}\right )}{g^3}-\frac{(50176 b n) \operatorname{Subst}\left (\int x \left (a+b \log \left (c x^n\right )\right ) \, dx,x,d+e x\right )}{e^2 g}+\frac{(448 b (224 d-e h) n) \operatorname{Subst}\left (\int \left (a+b \log \left (c x^n\right )\right ) \, dx,x,d+e x\right )}{e^2 g}\\ &=\frac{448 a b (224 d-e h) n x}{e g}+\frac{448 a b (224 f-g h) n x}{g^2}-\frac{448 b^2 (224 f-g h) n^2 x}{g^2}+\frac{12544 b^2 n^2 (d+e x)^2}{e^2 g}+\frac{448 b^2 (224 f-g h) n (d+e x) \log \left (c (d+e x)^n\right )}{e g^2}-\frac{25088 b n (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{e^2 g}-\frac{224 (224 d-e h) (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e^2 g}-\frac{224 (224 f-g h) (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}+\frac{25088 (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e^2 g}+\frac{(224 f-g h)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac{e (f+g x)}{e f-d g}\right )}{g^3}+\frac{2 b (224 f-g h)^2 n \left (a+b \log \left (c (d+e x)^n\right )\right ) \text{Li}_2\left (-\frac{g (d+e x)}{e f-d g}\right )}{g^3}-\frac{2 b^2 (224 f-g h)^2 n^2 \text{Li}_3\left (-\frac{g (d+e x)}{e f-d g}\right )}{g^3}+\frac{\left (448 b^2 (224 d-e h) n\right ) \operatorname{Subst}\left (\int \log \left (c x^n\right ) \, dx,x,d+e x\right )}{e^2 g}\\ &=\frac{448 a b (224 d-e h) n x}{e g}+\frac{448 a b (224 f-g h) n x}{g^2}-\frac{448 b^2 (224 d-e h) n^2 x}{e g}-\frac{448 b^2 (224 f-g h) n^2 x}{g^2}+\frac{12544 b^2 n^2 (d+e x)^2}{e^2 g}+\frac{448 b^2 (224 d-e h) n (d+e x) \log \left (c (d+e x)^n\right )}{e^2 g}+\frac{448 b^2 (224 f-g h) n (d+e x) \log \left (c (d+e x)^n\right )}{e g^2}-\frac{25088 b n (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{e^2 g}-\frac{224 (224 d-e h) (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e^2 g}-\frac{224 (224 f-g h) (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}+\frac{25088 (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e^2 g}+\frac{(224 f-g h)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac{e (f+g x)}{e f-d g}\right )}{g^3}+\frac{2 b (224 f-g h)^2 n \left (a+b \log \left (c (d+e x)^n\right )\right ) \text{Li}_2\left (-\frac{g (d+e x)}{e f-d g}\right )}{g^3}-\frac{2 b^2 (224 f-g h)^2 n^2 \text{Li}_3\left (-\frac{g (d+e x)}{e f-d g}\right )}{g^3}\\ \end{align*}

Mathematica [A]  time = 0.551898, size = 876, normalized size = 1.87 \[ \frac{8 b e^2 g^2 n \left (a-b n \log (d+e x)+b \log \left (c (d+e x)^n\right )\right ) \left (\log (d+e x) \log \left (\frac{e (f+g x)}{e f-d g}\right )+\text{PolyLog}\left (2,\frac{g (d+e x)}{d g-e f}\right )\right ) h^2+4 b^2 e^2 g^2 n^2 \left (\log \left (\frac{e (f+g x)}{e f-d g}\right ) \log ^2(d+e x)+2 \text{PolyLog}\left (2,\frac{g (d+e x)}{d g-e f}\right ) \log (d+e x)-2 \text{PolyLog}\left (3,\frac{g (d+e x)}{d g-e f}\right )\right ) h^2-16 b e g i n \left (a-b n \log (d+e x)+b \log \left (c (d+e x)^n\right )\right ) \left (e f \left (\log (d+e x) \log \left (\frac{e (f+g x)}{e f-d g}\right )+\text{PolyLog}\left (2,\frac{g (d+e x)}{d g-e f}\right )\right )-g (d+e x) (\log (d+e x)-1)\right ) h+8 b^2 e g i n^2 \left (g \left ((d+e x) \log ^2(d+e x)-2 (d+e x) \log (d+e x)+2 e x\right )-e f \left (\log \left (\frac{e (f+g x)}{e f-d g}\right ) \log ^2(d+e x)+2 \text{PolyLog}\left (2,\frac{g (d+e x)}{d g-e f}\right ) \log (d+e x)-2 \text{PolyLog}\left (3,\frac{g (d+e x)}{d g-e f}\right )\right )\right ) h+2 e^2 g^2 i^2 x^2 \left (a-b n \log (d+e x)+b \log \left (c (d+e x)^n\right )\right )^2+4 e^2 g i (2 g h-f i) x \left (a-b n \log (d+e x)+b \log \left (c (d+e x)^n\right )\right )^2+4 e^2 (g h-f i)^2 \left (a-b n \log (d+e x)+b \log \left (c (d+e x)^n\right )\right )^2 \log (f+g x)+2 b i^2 n \left (a-b n \log (d+e x)+b \log \left (c (d+e x)^n\right )\right ) \left (4 e^2 \text{PolyLog}\left (2,\frac{g (d+e x)}{d g-e f}\right ) f^2+e g (e x (4 f-g x)+2 d (2 f+g x))-2 \log (d+e x) \left (g (d+e x) (2 e f+d g-e g x)-2 e^2 f^2 \log \left (\frac{e (f+g x)}{e f-d g}\right )\right )\right )-b^2 i^2 n^2 \left (-4 e^2 \left (\log \left (\frac{e (f+g x)}{e f-d g}\right ) \log ^2(d+e x)+2 \text{PolyLog}\left (2,\frac{g (d+e x)}{d g-e f}\right ) \log (d+e x)-2 \text{PolyLog}\left (3,\frac{g (d+e x)}{d g-e f}\right )\right ) f^2+4 e g \left ((d+e x) \log ^2(d+e x)-2 (d+e x) \log (d+e x)+2 e x\right ) f+g^2 \left (2 \left (d^2-e^2 x^2\right ) \log ^2(d+e x)+\left (-6 d^2-4 e x d+2 e^2 x^2\right ) \log (d+e x)+e x (6 d-e x)\right )\right )}{4 e^2 g^3} \]

Antiderivative was successfully verified.

[In]

Integrate[((h + i*x)^2*(a + b*Log[c*(d + e*x)^n])^2)/(f + g*x),x]

[Out]

(4*e^2*g*i*(2*g*h - f*i)*x*(a - b*n*Log[d + e*x] + b*Log[c*(d + e*x)^n])^2 + 2*e^2*g^2*i^2*x^2*(a - b*n*Log[d
+ e*x] + b*Log[c*(d + e*x)^n])^2 + 4*e^2*(g*h - f*i)^2*(a - b*n*Log[d + e*x] + b*Log[c*(d + e*x)^n])^2*Log[f +
 g*x] + 8*b*e^2*g^2*h^2*n*(a - b*n*Log[d + e*x] + b*Log[c*(d + e*x)^n])*(Log[d + e*x]*Log[(e*(f + g*x))/(e*f -
 d*g)] + PolyLog[2, (g*(d + e*x))/(-(e*f) + d*g)]) + 2*b*i^2*n*(a - b*n*Log[d + e*x] + b*Log[c*(d + e*x)^n])*(
e*g*(e*x*(4*f - g*x) + 2*d*(2*f + g*x)) - 2*Log[d + e*x]*(g*(d + e*x)*(2*e*f + d*g - e*g*x) - 2*e^2*f^2*Log[(e
*(f + g*x))/(e*f - d*g)]) + 4*e^2*f^2*PolyLog[2, (g*(d + e*x))/(-(e*f) + d*g)]) - 16*b*e*g*h*i*n*(a - b*n*Log[
d + e*x] + b*Log[c*(d + e*x)^n])*(-(g*(d + e*x)*(-1 + Log[d + e*x])) + e*f*(Log[d + e*x]*Log[(e*(f + g*x))/(e*
f - d*g)] + PolyLog[2, (g*(d + e*x))/(-(e*f) + d*g)])) + 8*b^2*e*g*h*i*n^2*(g*(2*e*x - 2*(d + e*x)*Log[d + e*x
] + (d + e*x)*Log[d + e*x]^2) - e*f*(Log[d + e*x]^2*Log[(e*(f + g*x))/(e*f - d*g)] + 2*Log[d + e*x]*PolyLog[2,
 (g*(d + e*x))/(-(e*f) + d*g)] - 2*PolyLog[3, (g*(d + e*x))/(-(e*f) + d*g)])) - b^2*i^2*n^2*(4*e*f*g*(2*e*x -
2*(d + e*x)*Log[d + e*x] + (d + e*x)*Log[d + e*x]^2) + g^2*(e*x*(6*d - e*x) + (-6*d^2 - 4*d*e*x + 2*e^2*x^2)*L
og[d + e*x] + 2*(d^2 - e^2*x^2)*Log[d + e*x]^2) - 4*e^2*f^2*(Log[d + e*x]^2*Log[(e*(f + g*x))/(e*f - d*g)] + 2
*Log[d + e*x]*PolyLog[2, (g*(d + e*x))/(-(e*f) + d*g)] - 2*PolyLog[3, (g*(d + e*x))/(-(e*f) + d*g)])) + 4*b^2*
e^2*g^2*h^2*n^2*(Log[d + e*x]^2*Log[(e*(f + g*x))/(e*f - d*g)] + 2*Log[d + e*x]*PolyLog[2, (g*(d + e*x))/(-(e*
f) + d*g)] - 2*PolyLog[3, (g*(d + e*x))/(-(e*f) + d*g)]))/(4*e^2*g^3)

________________________________________________________________________________________

Maple [F]  time = 1.678, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( ix+h \right ) ^{2} \left ( a+b\ln \left ( c \left ( ex+d \right ) ^{n} \right ) \right ) ^{2}}{gx+f}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((i*x+h)^2*(a+b*ln(c*(e*x+d)^n))^2/(g*x+f),x)

[Out]

int((i*x+h)^2*(a+b*ln(c*(e*x+d)^n))^2/(g*x+f),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} 2 \, a^{2} h i{\left (\frac{x}{g} - \frac{f \log \left (g x + f\right )}{g^{2}}\right )} + \frac{1}{2} \, a^{2} i^{2}{\left (\frac{2 \, f^{2} \log \left (g x + f\right )}{g^{3}} + \frac{g x^{2} - 2 \, f x}{g^{2}}\right )} + \frac{a^{2} h^{2} \log \left (g x + f\right )}{g} + \int \frac{b^{2} h^{2} \log \left (c\right )^{2} + 2 \, a b h^{2} \log \left (c\right ) +{\left (b^{2} i^{2} \log \left (c\right )^{2} + 2 \, a b i^{2} \log \left (c\right )\right )} x^{2} +{\left (b^{2} i^{2} x^{2} + 2 \, b^{2} h i x + b^{2} h^{2}\right )} \log \left ({\left (e x + d\right )}^{n}\right )^{2} + 2 \,{\left (b^{2} h i \log \left (c\right )^{2} + 2 \, a b h i \log \left (c\right )\right )} x + 2 \,{\left (b^{2} h^{2} \log \left (c\right ) + a b h^{2} +{\left (b^{2} i^{2} \log \left (c\right ) + a b i^{2}\right )} x^{2} + 2 \,{\left (b^{2} h i \log \left (c\right ) + a b h i\right )} x\right )} \log \left ({\left (e x + d\right )}^{n}\right )}{g x + f}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((i*x+h)^2*(a+b*log(c*(e*x+d)^n))^2/(g*x+f),x, algorithm="maxima")

[Out]

2*a^2*h*i*(x/g - f*log(g*x + f)/g^2) + 1/2*a^2*i^2*(2*f^2*log(g*x + f)/g^3 + (g*x^2 - 2*f*x)/g^2) + a^2*h^2*lo
g(g*x + f)/g + integrate((b^2*h^2*log(c)^2 + 2*a*b*h^2*log(c) + (b^2*i^2*log(c)^2 + 2*a*b*i^2*log(c))*x^2 + (b
^2*i^2*x^2 + 2*b^2*h*i*x + b^2*h^2)*log((e*x + d)^n)^2 + 2*(b^2*h*i*log(c)^2 + 2*a*b*h*i*log(c))*x + 2*(b^2*h^
2*log(c) + a*b*h^2 + (b^2*i^2*log(c) + a*b*i^2)*x^2 + 2*(b^2*h*i*log(c) + a*b*h*i)*x)*log((e*x + d)^n))/(g*x +
 f), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{a^{2} i^{2} x^{2} + 2 \, a^{2} h i x + a^{2} h^{2} +{\left (b^{2} i^{2} x^{2} + 2 \, b^{2} h i x + b^{2} h^{2}\right )} \log \left ({\left (e x + d\right )}^{n} c\right )^{2} + 2 \,{\left (a b i^{2} x^{2} + 2 \, a b h i x + a b h^{2}\right )} \log \left ({\left (e x + d\right )}^{n} c\right )}{g x + f}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((i*x+h)^2*(a+b*log(c*(e*x+d)^n))^2/(g*x+f),x, algorithm="fricas")

[Out]

integral((a^2*i^2*x^2 + 2*a^2*h*i*x + a^2*h^2 + (b^2*i^2*x^2 + 2*b^2*h*i*x + b^2*h^2)*log((e*x + d)^n*c)^2 + 2
*(a*b*i^2*x^2 + 2*a*b*h*i*x + a*b*h^2)*log((e*x + d)^n*c))/(g*x + f), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (a + b \log{\left (c \left (d + e x\right )^{n} \right )}\right )^{2} \left (h + i x\right )^{2}}{f + g x}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((i*x+h)**2*(a+b*ln(c*(e*x+d)**n))**2/(g*x+f),x)

[Out]

Integral((a + b*log(c*(d + e*x)**n))**2*(h + i*x)**2/(f + g*x), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (i x + h\right )}^{2}{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}^{2}}{g x + f}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((i*x+h)^2*(a+b*log(c*(e*x+d)^n))^2/(g*x+f),x, algorithm="giac")

[Out]

integrate((i*x + h)^2*(b*log((e*x + d)^n*c) + a)^2/(g*x + f), x)